package cn.shop.gateway.model;

import javafx.beans.property.*;

/**
 * @author : 李一涵
 * @date : Created in 2021-12-8 17:47
 * @description :
 */

public class MerchantGameTemplate {

    private final LongProperty id = new SimpleLongProperty();
    private final StringProperty name = new SimpleStringProperty();
    private final DoubleProperty ratio = new SimpleDoubleProperty();
    private final StringProperty currency = new SimpleStringProperty();

    public long getId() {
        return id.get();
    }

    public LongProperty idProperty() {
        return id;
    }

    public void setId(long id) {
        this.id.set(id);
    }

    public String getName() {
        return name.get();
    }

    public StringProperty nameProperty() {
        return name;
    }

    public void setName(String name) {
        this.name.set(name);
    }

    public String getCurrency() {
        return currency.get();
    }

    public StringProperty currencyProperty() {
        return currency;
    }

    public void setCurrency(String currency) {
        this.currency.set(currency);
    }

    public double getRatio() {
        return ratio.get();
    }

    public DoubleProperty ratioProperty() {
        return ratio;
    }

    public void setRatio(double ratio) {
        this.ratio.set(ratio);
    }

    public static class Table {
        public final static String NAME = "game_template";
        public final static String CREATE_SQL = "CREATE TABLE " + NAME + "(" +
                Field.ID + " bigint KEY NOT NULL," +
                Field.NAME + " text ," +
                Field.RATIO + " number ," +
                Field.CURRENCY + " text)";
    }

    public static class Field {
        public final static String ID = "id";
        public final static String NAME = "name";
        public final static String RATIO = "ratio";
        public final static String CURRENCY = "currency";
    }
}
